﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ObjectBakery.Helpers;
using System.IO;
using ObjectBakery.Tests.TestDoubles;

namespace ObjectBakery.Tests.TestFactories
{
    public class TestAssetFactory
    {
        public List<Asset> Build()
        {
            List<Asset> lstAssets = new List<Asset>();
            lstAssets.Add(new Asset
            {
                ID = lstAssets.Count + 1,
                Name = "Brochure",
                Format = AssetFormat.Docx,
                Data = AssemblyHelper.GetResourceAsMemoryStream(this.GetType().Assembly,
                           "TestAssets.23424297987a.docx").ToArray()
            });
            lstAssets.Add(new Asset
            {
                ID = lstAssets.Count + 1,
                Name = "Image1",
                Format = AssetFormat.Jpg,
                Data = AssemblyHelper.GetResourceAsMemoryStream(this.GetType().Assembly,
                            "TestAssets.1220080919.jpg").ToArray()
            });
            lstAssets.Add(new Asset
            {
                ID = lstAssets.Count + 1,
                Name = "Image2",
                Format = AssetFormat.Jpg,
                Data = AssemblyHelper.GetResourceAsMemoryStream(this.GetType().Assembly,
                  "TestAssets.1220080919a.jpg").ToArray()
            });
            return lstAssets;
        }
    }
}
